import React, { Component } from 'react';
import { Level_two_three } from '../../utils/api';
import Cate from './Cate';
class MyGoodsRight extends Component {
  state = {
    list: []
  }
  UNSAFE_componentWillReceiveProps(nextProps) {
    console.log(333, nextProps);
    Level_two_three({ params: { id: nextProps.id } }).then(res => {
      this.setState({
        list: res.data.subcate.subcategory
      })
    })
  }
  render() {
    return (
      <div className='right'>
        <Cate list={this.state.list}></Cate>
      </div>
    );
  }
}

export default MyGoodsRight;